import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [{
            path: '/index',
            component: require('../views/index.vue'),
            children: [{
                    // 推荐
                    path: 'recommend',
                    component: require('../views/Recommend/recommend.vue')
                },
                {
                    // 面部美容
                    path: 'facialBeauty',
                    component: require('../views/FacialBeauty/facialBeauty.vue')
                },
                {
                    // 美体塑性
                    path: 'plastic',
                    component: require('../views/Plastic/plastic.vue')
                },
                { // 四季养生
                    path: 'health',
                    component: require('../views/Health/health.vue')
                },
                {
                    // 光电医学
                    path: 'medicine',
                    component: require('../views/Medicine/medicine.vue')
                }
            ]
        },
        { // 店铺
            path: '/shop',
            component: require('../views/Shop/shop.vue'),
        },
        { // 订单
            path: '/order',
            component: require('../views/Order/order.vue'),
        },
        { // 我的
            path: '/my',
            component: require('../views/My/my.vue'),
        },
        { // 登录
            path: '/login',
            component: require('../components/login/Login.vue'),
        },

        { // 默认跳转到 '/index/recommend'
            path: '*',
            redirect: '/index/recommend'
        }
    ]
})